Method and apparatus for reducing latency and message traffic during data and lock transfer in a multi-node system

ABSTRACT

A method and apparatus are provided for improving the performance associated with transferring a data item and obtaining a lock in a multi-node system by interpreting the block transfer message as a lock grant message. Typically when a Holder of a data item transfers a data item (e.g. block) to a Requestor of that data item, the Holder will down-convert its lock for that data item and send a message to the Master of this data item indicating that a down-convert has been performed. Subsequently, the Master sends a lock grant message to the Requestor of the data item to inform the Requestor that it has been granted a lock for the data item. By interpreting the block transfer message as a lock grant message, the down-convert message and the lock grant message can be eliminated, which results in improved performance.

FIELD OF THE INVENTION

The present invention relates to techniques for reducing the latency andmessage traffic associated with one entity requesting a data item, andthe lock associated with this data item, from another entity.

BACKGROUND OF THE INVENTION

To improve scalability, some database and file systems permit more thanone database or file server (each running separately) to concurrentlyaccess shared storage such as disk media. Each database or file serverhas a cache for caching shared data items, such as disk blocks. Suchmulti-node systems are referred to herein as clusters. One problemassociated with a cluster is the overhead associated with obtaining adata item and the lock associated with this data item.

The entities that desire access to a data item are referred to herein as“Requestors” for the data item. The one or more entities that currentlyhold the rights to access the data item are referred to herein as theHolders of the data item. The entity that is responsible for keepingtrack of the locks that are associated with the data item, for all thenodes in a cluster, is referred to herein as the Master of the dataitem. The Master, Holder(s), and Requestor(s) of a data item may beseparate processes on a single node, processes on separate nodes, orsome may be processes on the same node with others on separate nodes.

In a typical scenario, a Holder holds the most recent version of a dataitem in its cache. The Requestor requests some level of access, andhence a lock, on the data item. The type of lock that a Requestorrequires depends on the type of access the Requestor wishes to perform.Thus, lock requests typically specify the “lock mode” of the lock thatis desired. Consequently, obtaining a particular type of lock may alsobe called “obtaining a lock in a particular mode”. For example, in orderto read a data item, an S lock (e.g. share lock) must be obtained. Inorder to modify a data item, an X lock (e.g. exclusive lock) must beobtained. In order for an X lock to be held, no other Holders may holdany other locks. However, several Holders may hold S locks concurrently.

Various messages must be exchanged for a Requestor to obtain a data itemand a lock associated with this data item. Referring to FIGS. 1A and 1B,FIG. 1A is a block diagram portraying a cluster where a Master 100, aHolder 110 and a Requestor 120 are on separate nodes. Furthermore theRequestor 120 needs an S lock and the Holder 110 already has an X lock.FIG. 1B shows a script of messages, which would be used by the scenariodepicted in FIG. 1A. FIG. 1B also shows the parameters, which would beassociated with these messages.

More than likely, the connection between the Holder 110 on Node A andthe Requestor 120 on Node B is a high speed connection. The connectionbetween the Requestor 120 on Node B and the Master 100 on Node C is aslower connection.

Initially, the Holder 110 has a data item and an X lock for this dataitem. Subsequently a Requestor 120 needs access to this data item and anS lock for it. In order to request access to the data item and to obtainan S lock for this data item, the Requestor 120 on Node B sends an lockrequest message to the Master 100 on Node C. Associated with the lockrequest message is a memory location into which the requested data itemwill ultimately be transferred and a desired lock mode, which indicatesthat the Requestor 120 needs an S lock.

When the Master 100 receives the lock request message, the Master 100sends a message to the Holder 110 on Node A to inform the Holder 110(e.g. inform lock holder) that there is a Requestor 120 that needs thedata item in share mode.

The Holder 110 will transfer the requested data item to the Requestor'sspecified memory location. The Holder 110 performs a memory-to-memorytransfer to transfer the data item to the Requestor 120. In addition,the Holder 110 on Node A will down-convert its lock from an X lock to anS lock and notify the Master 100 of this down conversion. The transferof the requested data item (e.g. TBM) and the down-convert message maybesent in parallel.

When the Master 100 receives the down-convert message, Master 100 grantsthe Requestor 120 on Node B an S lock by sending the Requestor 120 alock grant message. Only after Requestor 120 receives the lock grantmessage may Requestor 120 access the data item.

In this scenario, latency, or time from initial request (e.g. LRM) totime when the data item can be used (e.g. Requestor 120 receives thelock grant message), is four small messages (e.g. lock request message,inform lock holder, down-convert message, and lock grant message). Thetraffic is four small messages (lock request message, inform lockholder, down-convert message, and lock grant message) and one transferof the requested data item.

To increase the speed of operations in the cluster, it is desirable toprovide techniques that reduce the amount of time that Requestors mustwait before they can access the data items they request.

SUMMARY OF THE INVENTION

A method and apparatus are provided for improving the performanceassociated with transferring a data item and obtaining a lock in amulti-node system. The techniques described are applicable in anycontext in which entities that have caches share access to resources.Such contexts include, but are not limited to file systems and databasesystems. According to one aspect of the invention, increased performanceis achieved by causing Requestors to interpret the block transfermessage as a lock grant message. Thus, the Requestor may access the dataitem as soon as it is received without having to wait for the explicitlock grant from the Master.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example, and not by wayof limitation, in the figures of the accompanying drawings in which likereference numerals refer to similar elements and in which:

FIG. 1A is a block diagram illustrating a cache-to-cache transfer of themost recent version of a data item and a lock associated with this dataitem;

FIG. 1B is a message script, which corresponds to FIG. 1A;

FIG. 2A is a block diagram illustrating the Master, Holder, andRequestor on separate nodes in a cluster;

FIG. 2B is a message script, which corresponds to FIG. 2A;

FIG. 3A is a block diagram illustrating the Master and the Requestor onthe same node;

FIG. 3B is a message script, which corresponds to FIG. 3A;

FIG. 4A is a block diagram illustrating the Master and the Holder on thesame node;

FIG. 4B is a message script, which corresponds to FIG. 4A;

FIG. 5A is a block diagram illustrating multiple share lock Holders anda Requestor of a share lock;

FIG. 5B is a message script, which corresponds to FIG. 5A;

FIG. 6A is a block diagram illustrating multiple share lock Holders anda requestor of an exclusive lock;

FIG. 6B is a message script, which corresponds to FIG. 6A;

FIG. 7A is a block diagram illustrating a situation where the Masterreceives a lock request message before receiving a lock assume message;

FIG. 7B is a message script, which corresponds to FIG. 7A;

FIG. 8A is a block diagram illustrating how to handle a disconnectduring the transfer of a data item;

FIG. 8B is a message script, which corresponds to FIG. 8A;

FIG. 9A is a block diagram illustrating how to handle concurrent lockrequests from more than one share lock requestor;

FIG. 9B is a message script, which corresponds to FIG. 9A;

FIG. 10A is a block diagram illustrating how to handle timing issues forlock request messages;

FIG. 10B is a message script, which corresponds to FIG. 10A;

FIG. 11A is a block diagram illustrating how to handle a mismatch inlock status;

FIG. 11B is a message script, which corresponds to FIG. 11A; and

FIG. 12 is a block diagram of a computer system on which an embodimentof the invention may be implemented.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

A method and apparatus for improving the performance associated withtransferring a block (e.g. data item) and obtaining a lock in a clusterby interpreting the block transfer message as a lock grant message isdescribed herein. In the following description, for the purposes ofexplanation, numerous specific details are set forth in order to providea thorough understanding of the present invention. It will be apparent,however, to one skilled in the art that the present invention may bepracticed without these specific details. In other instances, well-knownstructures and devices are shown in block diagram form in order to avoidunnecessarily obscuring the present invention.

The techniques described hereafter are applicable in any context inwhich entities that have caches share access to resources. Such contextsinclude, but are not limited to file systems and database systems. Whenused in the context of file systems, the file system blocks may not haveredundant fields in the data item headers as described hereinafter inthe discussion of the Transfer Block Message under Terminology. Insteadof using redundant fields in the data item header, the new lock mode androle can be placed in a header location that is separate from the datalocation. Furthermore, the request memory address must include theheader and data location. The header and data can be sent throughscatter/gather operations in the interconnect.

Terminology

The following terms will be used to refer to the messages that areexchanged in the many scenarios presented herein to describe embodimentsof the invention:

1) Lock Request Message (LRM):

The Requestor sends an LRM to the Master. In some systems, the Requestormay include in the LRM a memory location into which the data item is tobe copied.

2) Inform Lock Holders Message (ILH):

The Master sends an ILH to the Holder to inform the Holder that there isa Requestor that is interested in obtaining a lock for the data item(i.e. desires to access the data item). The ILH may be sent to manyHolders that hold S locks on a data item if the Requestor desires anexclusive lock.

3) Transfer Block Message (TBM):

The Holder transfers the data item (e.g. block), which is in theHolder's cache, to the Requestor with a TBM. Receipt of the TransferBlock Message is interpreted by the requestor as a lock grant from theHolder of the data item.

Not only does TBM include the contents of the data item but also theHolder's lock state information. The lock state information can simplyconsist of the lock mode. In some systems, lock state information mayadditionally contain the version numbers of the data item that isretained in the holder's cache or some indication of which node sent thedata item. One technique of sending information associated with the dataitem is to store this information in redundant fields in the data item'sheader. Data item header fields are considered “redundant” if therequesting node can reconstruct these “redundant” fields after receivingthe data item. Examples of redundant fields are the database blockaddress and the database block type.

A second technique for sending information associated with a data itemis to use “scatter/gather” techniques to send separate header andpayload fields in a single underlying message. For example, a typicalwrite/send operation may be performed by making a call such as:

send(some_dest, some_buffer, buffer_length);

A vector send/write takes an array or list of buffers and puts them inone operation, something like the following:

v[0].buf=buf1;

v[0].len =buflen1;

v[1].buf =buf2;

v[1].len =buflen2;

vsend(some_dest, 2/* size of vector */, v);

while a receive/read would be the following:

v[0].buf =buf1;

v[0].len =buflen1;

v[1].buf=buf2;

v[1].len =buflen2;

vread(some_dest, 2, v);

The usual way these operations are used is to separate headerinformation from payload. In the example given for file system, the lockmessage information would be buf1, and the actual block would be inbuf2. Describing both operations in the API allows the underlying systemto turn what appears to be two operations into a single operation. Ifthis technique is used in a messaging system, the result is one messageon the wire, which is a big advantage.

A third technique for sending information associated with a data item isto send a separate status message (e.g. LSM) containing the lock stateinformation instead of including the lock state information with theTBM; however, sending a separate status message may decrease theusefulness of the protocol unless the system allows for sending aseparate LSM and a separate TBM through a “vector” send in parallel. Insuch a system that supports “vector” send in parallel, a separate LSMwill not reduce the efficiency of the protocol.

4) Broadcast Inform Lock Holders Message (BILH):

The Master sends a BILH to all of the shared lock Holders (e.g. all theHolders of share locks for a particular data item), except one Holder,to inform the share lock Holders that a Requestor is interested inobtaining a lock for a data item, which the share lock Holders currentlyhold shared locks on.

5) Down-Convert Message (DCM):

The Holder down-converts its lock (for example, from exclusive mode toshare mode) and informs the Master that the lock has been down-convertedby sending a DCM to the Master.

6) Update Lock Mode (ULM):

When more than one Holder needs to inform the Master that they havechanged/updated their lock mode in response to a request for a dataitem. The Holders send ULMs to the master along with the lock id and newlock mode associated with this lock id.

7) Lock Grant Message (LGM):

The Master sends a LGM to the Requestor to inform the Requestor that thelock has been granted to the Requestor.

8) Lock Status Message (LSM):

When two entities (e.g. Master, Requestor(s), Holder(s)) realize thattheir respective lock statuses do not match, the two entities willexchange statuses with the LSM. For example, when the Master receives aLRM, which includes lock status, from a Holder and the lock status fromthis Holder does not match the lock status that the Master has, theMaster will send a LSM to the Holder with the Master's lock status. Thenthe Holder will send back to the Master a LSM, which will include thelock status, as the Holder knows it. Thus, the Master and Holder canresynchronize their lock status for a particular data item.

Lock Assume Message

As stated before, typically when a Holder of a data item transfers thedata item to a Requestor of that data item, the Holder will down-convertits lock for that data item and send a message to the Master of thisdata item indicating that a down-convert has been performed.Subsequently, the Master sends a lock grant message to the Requestor ofthe data item to inform the Requestor that the Requestor has beengranted a lock for the data item.

In contrast, techniques are provided in which Requestors do not wait fora lock grant message from the Master. Rather, Requestors interpretreceipt of the data item from the Holder as an implicit lock grantmessage. By the Requestor interpreting the block transfer message as alock grant message, the down-convert message and the lock grant messagecan be eliminated, which results in improved performance.

Ultimately the Master of a data item must be informed about whatentities hold locks on the data item. In embodiments in which Holders donot send down-convert messages to the Master, the Master must obtainthis information through some other mechanism. According to oneembodiment, in order for the Master to know that the Holder has alreadydown-converted its lock mode and that the Requestor has assumed the newlock mode, either the Requestor or the Holder sends a Lock AssumeMessage (LAM) to the Master.

Functional Overview

FIG. 2A is a block diagram portraying a cluster where the Master 200,Holder 210 and Requestor 220 are on separate nodes in a cluster.Furthermore the Requestor 220 needs an S lock and the Holder 210 alreadyhas an X lock. FIG. 2B shows a script of messages that would be used bythe scenario depicted in FIG. 2A. FIG. 2B also shows the parameters thatwould be associated with these messages.

The Holder 210 currently has a data item and an X lock for this dataitem. Requestor 220 needs access to this data item and an S lock for it.The following steps are executed so that the Requestor 220 can gainaccess to this data item in S mode:

1) Requestor Sends LRM to Master:

In order to request access to the data item and to obtain an S lock forthis data item, the Requestor 220 sends an LRM to the Master 200.Associated with the LRM is a memory location into which the requesteddata item will ultimately be transferred and a desired lock mode, whichindicates that the Requestor 220 needs an S lock.

2) Master Sends ILH to Holder:

When the Master 200 receives the LRM, the Master 200 sends an ILH to theHolder 210 to inform the Holder 210 that there is a Requestor 220 thatneeds the data item in share mode.

3) Holder Sends TBM to Requestor:

The Holder 210 will transfer the requested data item with a TBM usingthe Requestor's memory location (box 220). The Holder 210 performs amemory-to-memory transfer to transfer the data item to the Requestor220.

The Requestor 220 of the S lock interprets receipt of the data item as alock grant, thus eliminating the need to wait for the LGM and DCM.Furthermore since the Holder 210 has an X lock and no other Holder mayhold any other locks at the same time that an X lock is being held, theHolder 210 will down-convert its lock from an X lock to an S lock upontransferring the data item. According to one embodiment, thisdown-convert is performed by changing lock information maintainedlocally on Holder 210, but Holder 210 does not notify the Master 200 ofthis down conversion with a DCM.

4) Requestor Sends LAM to Master:

The Requestor 220 sends a LAM to the Master 200 indicating that theRequestor 220 has assumed an S lock for the data item that wastransferred by the Holder 210. In response to the LAM, the Master 200revises its lock information for the data item to indicate that bothRequestor 220 and Holder 210 have S locks on the data item. According toanother embodiment of this invention instead of the Requestor 220sending a LAM to the Master 200, the Holder 210 could send the LAM tothe Master 200 concurrently to sending a TBM to Requestor 220.

More than likely, the connection between the Holder 210 on Node A andthe Requestor 220 on Node B is a high speed connection. The connectionbetween the Requestor 220 on Node B and the Master 200 on Node C is aslower connection. Assume that this configuration is true for all of thescenarios described herein.

In this scenario the latency, or time from initial request (e.g. LRM) totime when the data item can be used (e.g. completion of TBM), is 2 smallmessages and one data item transfer (e.g. LRM, ILH, TBM). The totaltraffic is 3 small messages and one data item transfer (e.g. LRM, ILH,LAM, and TBM).

Master and Requestor on Same Node

FIG. 3A is a block diagram portraying a cluster where the Master 310 andRequestor 320 are separate processes on the same node, Node B 300, andthe Holder 330 is on a separate node, Node A 330. The Requestor 320needs an S lock and the Holder 330 already has an X lock. FIG. 3B showsa script of messages, which would be used by the scenario depicted inFIG. 3A. FIG. 3B also shows the parameters, which would be associatedwith these messages.

The Holder 330 currently has a data item and an X lock for this dataitem. Requestor 320 needs access to this data item and an S lock for it.The steps, which are executed so that the Requestor 320 can gain accessto this data item in S mode, are the same as in FIGS. 2A and 2B exceptfor two things: One, the messages LRM and LAM are sent between twoprocesses on the same node instead of two processes on separate nodesand therefore are procedure invocations. Two, the LAM is not essentialbecause the Requestor 320 could update the Master 310's lock structureto down-convert Holder 330's lock.

In this scenario the latency, or time from initial request (e.g. LRM) totime when the data item can be used (e.g. completion of TBM), is onesmall messages and one data item transfer (e.g. ILH, TBM). The totaltraffic is also one small message and one data item transfer (e.g. ILH,TBM). The messages LRM and LAM are not considered a part of the latencyor total traffic since these messages are between processes on the samenode and therefore are treated as procedure invocations.

Master and Holder on Same Node

FIG. 4A is a block diagram portraying a cluster where the Master 410 andHolder 420 are separate processes on the same node, Node A (box 400),and the Requestor 430 is on a separate node, Node B (box 430). TheRequestor 430 needs an S lock and the Holder 420 already has an X lock.FIG. 4B shows a script of messages, which would be used by the scenariodepicted in FIG. 4A. FIG. 4B also shows the parameters, which would beassociated with these messages.

The Holder 420 currently has a data item and an X lock for this dataitem. Subsequently, a Requestor 430 needs access to this data item andan S lock for it. The steps, which are executed so that the Requestor430 can gain access to this data item in S mode, are the same as inFIGS. 2A and 2B except for two things: One, the message ILH is sentbetween two processes on the same node instead of between two processeson separate nodes. Two, the LAM from Requestor 430 to Master 410 is notessential. The reason being that after the Holder 420 receives the ILH,the Holder 420 can down convert the Holder's local lock mode and at thesame time the Holder 420 can also update the Requestor 430's lock modein the Master 410's lock structures.

In this scenario the latency, or time from initial request (e.g. LRM) totime when the data item can be used (e.g. completion of TBM), is twosmall messages and one data item transfer (e.g. LRM, LAM, TBM). Thetotal traffic is also two small message and one data item transfer (e.g.LRM, LAM, TBM). If the LAM is eliminated then the latency is one smallmessage and one data item transfer (e.g. LRM, TBM) and the total trafficis also one small message and one data item transfer (e.g. LRM, TBM).The message ILH is not considered a part of the latency or total trafficsince ILH is between processes on the same node and therefore is treatedas a procedure invocation.

Multiple Share Lock Holders and Requestor of S Lock

FIG. 5A is a block diagram portraying a cluster where the Master 500,two Holders (boxes 510 and 530) and a Requestor 520 are on separatenodes in a cluster. Furthermore, the Requestor 520 needs an S lock andthe Holders (boxes 510 and 530) already have S locks. The two S lockHolders (boxes 510 and 530) will not need to relinquish their respectiveS locks in order for the Requestor 520 to also obtain an S lock. FIG. 5Bshows a script of messages, which would be used by the scenario depictedin FIG. 5A. FIG. 5B also shows the parameters, which would be associatedwith these messages. The steps, which are executed so that the Requestor520 can gain access to this data item in S mode, are the same as inFIGS. 2A and 2B except that the Master 500 picks only one of the ShareLock Holders (boxes 510 and 520), which are on Node A and Node C, tosend the ILH to.

As shown in FIG. 5A, the Master 500 sends the ILH to the Holder 510.Various methods can be used by the Master 500 to pick which Holder (510or 530) to send the ILH to. Two such possibilities are as follows:

1) pick the most recent grantee of the S lock because it is more likelyto have the data item in cache; or

2) if there is an S lock Holder on the same node as the Master, pick theS lock Holder that is on the same node as the Master thus reducingmessage traffic. The above possibilities for picking which Holder tosend the ILH to will apply to the other scenarios where there aremultiple Holders. From there on, the steps in FIGS. 5A and 5B are thesame as in FIGS. 2A and 2B respectively.

Multiple Share Lock Holders and Requestor of X Lock

FIG. 6A is a block diagram portraying a cluster where the Master 600,three Holders (boxes 610, 620, 630) and a Requestor 640 are on separatenodes in a cluster. The Requestor 640 needs an X lock and the threeHolders (boxes 610, 620, 630) already have S locks. In order for theRequestor 640 to obtain an X lock, the three Holders (boxes 610, 620,630) will need to relinquish their respective S locks. FIG. 6B shows ascript of messages, which would be used by the scenario depicted in FIG.6A. FIG. 6B also shows the parameters, which would be associated withthese messages.

The following steps are executed so that the Requestor 640 can gainaccess to this data item in X mode:

1) Requestor Sends LRM to Master:

In order to request access to the data item and to obtain an X lock forthis data item, the Requestor box 640 sends an LRM to the Master 600.Associated with the LRM is a memory location into which the requesteddata item will ultimately be transferred and a desired lock mode, whichindicates that the Requestor 640 needs an S lock.

2) Master Sends BILH to All but One of the Holders:

When the Master 600 receives the LRM, the Master 600 sends a BILH to allof the Holders (boxes 610, 620) simultaneously except one (Holder 630)to inform the other Holders (boxes 610, 620) that there is a Requestor640 that needs the data item in exclusive mode.

3) Notified Holders Respond with ULM to Master:

The notified Holders (boxes 610, 620) release their respective S locksand respond back to the Master 600 with a ULM indicating that theirlocks (e.g. Holders on 610 and 620) have been released. The ULMs will besent out by the notified Holders (boxes 610, 620) to the Master 600 atapproximately the same time.

4) Master Sends ILH to Last Holder:

When the Master 600 receives the last of the ULMs, the Master 600 sendsan ILH to the last of the S lock Holders, which in this scenario isHolder 630, to inform this last Holder 630 that there is a Requestor640, which needs the data item in exclusive mode (e.g. X lock).

5) Last Holder Sends TBM to Requestor:

The last Holder 630 will transfer the requested data item with a TBMusing the Requestor's memory location (box 640). This last Holder 630performs a memory-to-memory transfer to transfer the data item to theRequestor 640. The Requestor 640 of the X lock will interpret receipt ofthe data item as a lock grant, thus eliminating the LGM and DCM.Furthermore since the Holder 630 has an S lock and no other Holder mayhold any other locks at the same time that an X lock is being held, thelast Holder 630 will release its S lock upon transferring the data itemto the Requestor 640.

6) Requestor Sends LAM to Master:

The Requestor 640 sends a LAM to the Master 600 indicating that theRequestor 640 has assumed an X lock for the data item, which wastransferred to the Requestor 640.

In this scenario the latency, or time from initial request (e.g. LRM) totime when the data item can be used (e.g. completion of TBM), is 4 smallmessages and one data item transfer (e.g. LRM, BILH, ULM, ILH, TBM). Thetotal traffic depends on the number of S lock holders.

Master Receives Lock Request Message Before Lock Assume Message

FIG. 7A is a block diagram portraying a cluster where the Master 700,Holder 710 and Requestor 720 are on separate nodes in a cluster.Furthermore, the Requestor 720 needs an X lock and the Holder 710already has an X lock. FIG. 7B shows a script of messages, which wouldbe used by the scenario depicted in FIG. 7A. FIG. 7B also shows theparameters, which would be associated with these messages. The Holder710 currently has a data item and an X lock for this data item.Subsequently a Requestor 720 needs access to this data item and an Xlock for it.

The following steps are executed so that the Requestor 720 can gainaccess to this data item in X mode:

1) Requestor Sends LRM to Master:

In order to request access to the data item and to obtain an X lock forthis data item, the Requestor 720 sends an LRM to the Master 700.Associated with the LRM is a memory location into which the requesteddata item will ultimately be transferred and a desired lock mode, whichindicates that the Requestor 720 needs an X lock.

2) Master Sends ILH to Holder:

When the Master 700 receives the LRM, the Master 700 sends an ILH to theHolder 710 to inform the Holder 710 that there is a Requestor 720, whichneeds the data item in exclusive mode.

3) Holder Sends TBM to Requestor:

The Holder 710 will transfer the requested data item with a TBM usingthe Requestor's memory location (box 720). The Holder 710 performs amemory-to-memory transfer to transfer the data item to the Requestor720. The Requestor 710 of the X lock will interpret receipt of the dataitem as a lock grant, thus eliminating the LGM and DCM. Furthermoresince the Holder 710 has an X lock and no other Holder may hold anyother locks at the same time that an X lock is being held, the Holder710 will release its X lock upon transferring the data item. The Holder710 of the X lock will no longer notify the Master 700 of the releasewith a DCM.

4) Requestor Sends LAM to Master but Master Receives it After the LRM:

a) The Requestor 720 sends a LAM to the Master 700 indicating that theRequestor 720 has assumed an X lock for the data item that wastransferred to the Requestor 720.

b) However, before the Master 700 can receive the LAM that the Requestor720 sent, the Holder 710, which no longer thinks it is a Holder, sendsan LRM to request an X lock again for this same data item.

5) Master Sends LSM to Holder:

When the Master 700 receives the LRM (refer to message 4 b in FIG. 7A)from the Holder 710, the Master 700 determines that there is a mismatchbetween the Master's lock records on Node C (box 700) and the Holder'slock records on Node A (box 710) for the data item concerned. At thispoint in time, the Master 700 is waiting for an LAM to indicate that thenew Holder 720 is on Node B. However until the Master 700 actuallyreceives this LAM, the Master's lock records (box 700) still show thatthe Holder 710 is on Node A. To synchronize lock records, the Master 700sends an LSM, along with the Master's recorded lock mode, to the Holder710 on Node A.

6) Holder Sends LSM to Master:

When the Holder 710 receives the LSM from the Master 700, the Holder 710determines that the Holder's recorded lock mode (box 710) is out of syncwith the Master's recorded lock mode (box 700) for this data item. TheHolder 710 responds to this determination by sending an LSM to theMaster 700 along with the Holder's recorded lock mode (box 710) for thisdata item. When the Master 700 receives the LSM from the Holder 710, theMaster 700 and Holder 710 will be synchronized with respect to the lockmode associated with this data item.

When the Master receives the LAM from Requestor 720, Master 700 changesits lock information to indicate that Requestor 720 has an X lock, andsends to Requestor 720 an ILH to inform new Holder (ex-Requestor) 720that new Requestor (ex-Holder) 720 desires a lock. From here on theprocessing will continue in a normal fashion.

Although steps 5 and 6 produce correct results, steps 5 and 6 are notessential. When the Master 700 receives the LRM (4 b), the Master 700may determine the correct lock state and implicitly update the Master700's local lock state. This is particularly important for hot blocksbecause the probability that ex-Holder 710 will send a requestimmediately after TBM (3) is high.

Disconnect During Data Transfer

FIG. 8A is a block diagram portraying a cluster where the Master 800,Holder 810 and Requestor 820 are on separate nodes in a cluster.Furthermore, the transmission of the data item does not reach theRequestor 820. For the purposes of discussing this embodiment of theinvention, the lock modes do not matter. FIG. 8B shows a script ofmessages, which would be used by the scenario depicted in FIG. 8A. FIG.8B also shows the parameters, which would be associated with thesemessages. The Holder 810 currently has a data item and an X lock forthis data item. Subsequently a Requestor 820 needs access to this dataitem and lock for it. The following steps are executed so that theRequestor 820 can gain access to this data item and the appropriatelock:

1) Requestor Sends LRM to Master:

In order to request access to the data item and to obtain an S lock forthis data item, the Requestor 820 sends an LRM to the Master 800.Associated with the LRM is a memory location into which the requesteddata item will ultimately be transferred and a desired lock mode.

2) Master Sends ILH to Holder:

When the Master 800 receives the LRM, the Master 800 sends an ILH to theHolder 810 to inform the Holder 810 that there is a Requestor 820, whichneeds the data item in the indicated lock mode.

3) Holder Sends TBM to Requestor:

The Holder 810 will transfer the requested data item with a TBM usingthe Requestor's (box 820) memory location. However, due to some error,transfer of the requested data item is not completed. Therefore, theRequestor 820 of the lock is not able to interpret receipt of the dataitem as a lock grant. Furthermore the Holder 810 does not send an LAM tothe Master 800 indicating that the Holder 820 has assumed the lock.

According to one embodiment, this type of error situation is addressedby causing the Master 800 to include with all ILH messages the Master'scurrent understanding of the lock mode held by the entity to which theILH is being sent. For example, if the information at Master 800 stillindicates that Holder 810 has an exclusive lock on a resource, Master800 will send Holder 810 an ILH when another node requests a lock onthat resource. Master 800 will include with that ILH data that indicatesthat Master 800 believes Holder 810 has an X lock on the resource.

If a Holder 810 receives an ILH message with a lock status that does notmatch the lock status records of Holder 810, then the Holder 810 canrefuse the ILH and update the Master 800 as to the Holder's lock statusfor the data item. For example, Holder 810 may respond to an ILH thatindicates an X lock mode by sending an LSM to the Master 800 to indicatethat Holder 810 has downgraded its lock mode. When the Requestor 820determines that the TBM will not be coming, Requestor 820 will retry byresending the LRM to Master 800.

Multiple S Lock Requestors

FIG. 9A is a block diagram portraying a cluster where the Master 900,Holder 910 and two Requestors (boxes 920 and 930) are on separate nodesin a cluster. Furthermore the Requestors 920 and 930 need S locks andthe Holder 910 already has an X lock. The Requestors 920 and 930 sendtheir S lock requests at approximately the same time and the Master 900receives the S lock requests at approximately the same time. FIG. 9Bshows a script of messages that would be used by the scenario depictedin FIG. 9A. FIG. 9B also shows the parameters that would be associatedwith these messages.

The following steps are executed so that the Requestors 920 and 930 cangain access to this data item in S mode:

1) Requestors Sends LRMs to Master:

In order to request access to the data item and to obtain an S lock forthis data item, the Requestors 920 and 930 send LRMs to the Master 900.Associated with the LRMs are memory locations associated with theRequestors 920 and 930 into which the requested data item willultimately be transferred and a desired lock mode, which indicates thatthe Requestors 920 and 930 need S locks. The master receives the LRMsfrom Requestors 920 and 930 at approximately the same time.

2) Master Sends ILH to Holder:

When the Master 900 receives the LRMs, the Master 900 sends an ILH tothe Holder 910 to inform the Holder 910 that there are two Requestors920 and 930 that need the data item in share mode. Instead of sendingout separate ILHs to Holder 910 for each of the Requestors 920 and 930,the Master 900 batches the requests into one ILH by including the memorylocations, into which the data item needs to be copied, for bothRequestor 920 and 930 in the one ILH.

3) Holder Sends TBM to Requestors:

The Holder 910 will transfer the requested data item with a TBM usingthe Requestors' memory locations (box 920 and 930). The Holder 910perform memory-to-memory transfers to transfer the data item to theRequestors 920 and 930.

The Requestors 920 and 930 of the S lock interpret receipt of the dataitem as a lock grant, thus eliminating the need to wait for the LGM andDCM. Furthermore since the Holder 910 has an X lock and no other Holdermay hold any other locks at the same time that an X lock is being held,the Holder 910 will down-convert its lock from an X lock to an S lockupon transferring the data item. According to one embodiment, thisdown-convert is performed by changing lock information maintainedlocally on Holder 910, but Holder 910 does not notify the Master 900 ofthis down conversion with a DCM.

4) Requestors send LAMs to Master:

The Requestors 920 and 930 sends LAMs to the Master 900 indicating thatthe Requestors 920 and 930 have assumed their respective S locks for thedata item that was transferred by the Holder 910. In response to theLAM, the Master 900 revises its lock information for the data item toindicate that Requestor 920, Requestor 930 and Holder 910 have S lockson the data item.

In this scenario the latency, or time from initial request (e.g. LRM) totime when the data item can be used (e.g. completion of TBM), is 2 smallmessages and one data item transfer (e.g. LRM, ILH, TBM). The totaltraffic is 5 small messages and two data item transfer (e.g. two LRMs,one ILH, two LAMs, and two TBMs).

Timing Issues of Lock Request Messages

FIG. 10A is a block diagram portraying a cluster where the Master 1000,Holder 1010 and Requestor 1020 are on separate nodes in a cluster. TheHolder 1010 has an S lock and needs to raise the lock mode to an X lock.Furthermore the Requestor 1020 also needs an X lock. One point ofinterest in this scenario is that the Master 1000 will receive an LRMfrom the Requestor 1020 and shortly thereafter receive an LRM from theHolder 1010 requesting to raise the Holder 1010's lock mode from S to X.FIG. 10B shows a script of messages that would be used by the scenariodepicted in FIG. 10A. FIG. 10B also shows the parameters that would beassociated with these messages.

The Holder 1010 currently has a data item and an S lock for this dataitem. Both Holder 1010 and Requestor 1020 need access to this data itemin exclusive mode and therefore need an X lock for this data item. Thefollowing steps are executed so that the Requestor 1020 can gain accessto this data item in X mode:

1a) Requestor Sends LRM to Master:

In order to request access to the data item and to obtain an X lock forthis data item, the Requestor 1020 sends an LRM to the Master 1000.Associated with the LRM is a memory location into which the requesteddata item will ultimately be transferred and a desired lock mode, whichindicates that the Requestor 1020 needs an X lock.

1b) Holder Sends LRM to Master to Raise Lock from S to X:

In order to gain exclusive mode on a data item that the Holder 1010already has in S mode, the Holder 1010 sends an LRM requesting to raisethe lock mode for this data item from S to X to Master 1000. However,the Master 1000 has already received the Requestor 1020's LRM beforereceiving the Holder 1010's LRM.

2) Master Sends ILH to Holder:

When the Master 1000 receives the LRM from the Requestor 1020, theMaster 1000 sends an ILH to the Holder 1010 to inform the Holder 1010that there is a Requestor 1020 that needs the data item in exclusivemode. The Holder 1010 recognizes there is a discrepancy between itselfand Requestor 1020.

3) Holder Sends TBM to Requestor:

The Holder 1010 will transfer the requested data item with a TBM usingthe Requestor's memory location (box 1020). The Holder 1010 performs amemory-to-memory transfer to transfer the data item to the Requestor1020.

The Requestor 1020 of the lock interprets receipt of the data item as alock grant, thus eliminating the need to wait for the LGM and DCM.Furthermore since the Holder 1010 has an X lock and no other Holder mayhold any other locks at the same time that an X lock is being held, theHolder 1010 will relinquish its lock upon transferring the data item toRequestor 1020. The Holder 1010 of the X lock will no longer notify theMaster 1000 of the fact that the Holder 1010 has relinquished its lockwith a DCM.

4) Holder Resends LRM to Master:

At this point, the Holder 1010, which is no longer a holder, tries againto obtain an X lock for the data item in question by sending another LRMto the Master 1000. However, Requestor 1020 already has an X lock forthis data item. Therefore, at this point the previous Holder 1010 istreated like any other new Requestor and the previous Holder 1010's newrequest will be queued behind any other pending requests.

5) Requestor Sends LAM to Master:

The Requestor 1020 sends a LAM to the Master 1000 indicating that theRequestor 1020 has assumed an X lock for the data item that wastransferred by the Holder 1010. In response to the LAM, the Master 1000revises its lock information for the data item to indicate that theprevious Holder 1010 no longer has a lock on this data item andRequestor 1020 has an X lock on this same data item. After Master 1000has received the LAM from Requestor 1020, Master 1000 will treat Node A1010, which is now a Requestor, like any other Requestor; Thus Master1000 will send an ILH to Node B 1020 on behalf of Node A 1010.

In this scenario the latency, or time from initial request (e.g. LRM) totime when the data item can be used (e.g. completion of TBM), is 2 smallmessages and one data item transfer (e.g. LRM, ILH, TBM). The totaltraffic is 3 small messages and one data item transfer (e.g. LRM, ILH,LAM, and TBM).

Mismatch in Lock Status

FIG. 11A is a block diagram portraying a cluster where the Master 1100,620 Holders (boxes 1110 and 1120) and a Requestor 1130 are on separatenodes in a cluster. The two Holders (boxes 1110 and 1120) already have Slocks. Holder 1110 requests a raise in lock mode from S to X.Furthermore, The Requestor 1130 needs an X lock. In order for theRequestor 1130 to obtain an X lock, the two Holders (boxes 1110 and1120) will need to relinquish their respective S locks. FIG. 11B shows ascript of messages, which would be used by the scenario depicted in FIG.11A. FIG. 11B also shows the parameters, which would be associated withthese messages.

The following steps are executed so that the Requestor 1130 can gainaccess to this data item in X mode:

1) Requestor Sends LRM to Master and Holder also Sends LRM to Master:

In order to request access to the data item and to obtain an X lock forthis data item, the Requestor 1130 sends an LRM to the Master 1100.Associated with the LRM is a memory location into which the requesteddata item will ultimately be transferred and a desired lock mode, whichindicates that the Requestor 1130 needs an X lock.

At almost the same time, Holder 1110 also sends an LRM to Master 1100requesting that Holder 1110's lock be raised from S to X. However,according to this scenario, the LRM that Holder 1110 sends will bedelayed in arriving at Master 1100. The LRM will contain both thecurrent lock mode and the desired lock mode of Holder 1110 at the timethat Holder 1110 sent the LRM.

2) Master Sends BILH to all but one of the Holders:

When the Master 1100 receives the LRM, the Master 1100 sends a BILH toall of the Holders (box 1110) simultaneously except one (Holder 1120) toinform the other Holders (box 1110) that there is a Requestor 1130 thatneeds the data item in exclusive mode.

3) Notified Holders Respond with ULM to Master:

The notified Holder 1110 releases the S lock that Holder 1110 holds andresponds back to the Master 1100 with a ULM indicating that Holder 1110has released the lock. Holder 1110 will send a ULM to the Master 1100.Since the Master 1100 maintains lock mode with regards to all theentities that the Master 1100 is responsible for, the Master 1100 willupdate Holder 1110's lock mode, which resides on Master 1100, toindicate that Holder 1110 has released the lock (e.g. null) when Master1100 receives the LRM from Holder 1110.

4) Master Sends ILH to Last Holder:

When the Master 1100 receives the ULM, the Master 1100 sends an ILH tothe last of the S lock Holders, which in this scenario is Holder 1120,to inform this last Holder 1120 that there is a Requestor 1130, whichneeds the data item in exclusive mode (e.g. X lock).

5) Last Holder Sends TBM to Requestor:

The last Holder 1120 will transfer the requested data item with a TBMusing the Requestor's memory location (box 1130). This last Holder 1120performs a memory-to-memory transfer to transfer the data item to theRequestor 1130. The Requestor 1130 of the X lock will interpret receiptof the data item as a lock grant, thus eliminating the LGM and DCM.Furthermore since the Holder 1120 has an S lock and no other Holder mayhold any other locks at the same time that an X lock is being held, thelast Holder 1120 will release its S lock upon transferring the data itemto the Requestor 1130.

6) Requestor Sends LAM to Master:

The Requestor 1130 sends a LAM to the Master 1100 indicating that theRequestor 1130 has assumed an X lock for the data item, which wastransferred to the Requestor 1130.

7) Master Receives LRM from Previous Holder:

At this point, the LRM from the previous Holder 1110 arrives at Master1100. The Master 1100 thinks that the Holder 1110 has a lock mode ofreleased or null. However, the LRM that the Holder 1110 sent indicatesthat the Holder 1110's current mode is S, because at the time thatHolder 1110 sent the LRM, Holder 1110's lock mode was S. Therefore, theMaster 1100 and the Holder 1110 will update each other by exchangingLock Status Messages (e.g. LSM).

8) Master Sends LSM to Previous Holder:

Master 1100 sends an LSM to Holder 1110 with the lock mode according tothe Master 1100's understanding.

9) Previous Holder Sends LSM to Master:

Holder 1110 sends an LSM to Master 1100 with the lock mode according toHolder 1110's understanding. Then Master 110 and Holder 1110 will besynchronized as to the mode for the lock of the originally requesteddata item.

Hardware Overview

FIG. 12 is a block diagram that illustrates a computer system 1200 uponwhich an embodiment of the invention may be implemented. Computer system1200 includes a bus 1202 or other communication mechanism forcommunicating information, and a processor 1204 coupled with bus 1202for processing information. Computer system 1200 also includes a mainmemory 1206, such as a random access memory (RAM) or other dynamicstorage device, coupled to bus 1202 for storing information andinstructions to be executed by processor 1204. Main memory 1206 also maybe used for storing temporary variables or other intermediateinformation during execution of instructions to be executed by processor1204. Computer system 1200 further includes a read only memory (ROM)1208 or other static storage device coupled to bus 1202 for storingstatic information and instructions for processor 1204. A storage device1210, such as a magnetic disk or optical disk, is provided and coupledto bus 1202 for storing information and instructions.

Computer system 1200 may be coupled via bus 1202 to a display 1212, suchas a cathode ray tube (CRT), for displaying information to a computeruser. An input device 1214, including alphanumeric and other keys, iscoupled to bus 1202 for communicating information and command selectionsto processor 1204. Another type of user input device is cursor control1216, such as a mouse, a trackball, or cursor direction keys forcommunicating direction information and command selections to processor1204 and for controlling cursor movement on display 1212. This inputdevice typically has two degrees of freedom in two axes, a first axis(e.g., x) and a second axis (e.g., y), that allows the device to specifypositions in a plane.

The invention is related to the use of computer system 1200 for reducingthe overhead associated with a ping. According to one embodiment of theinvention, the overhead associated with a ping is reduced by computersystem 1200 in response to processor 1204 executing one or moresequences of one or more instructions contained in main memory 1206.Such instructions may be read into main memory 1206 from anothercomputer-readable medium, such as storage device 1210. Execution of thesequences of instructions contained in main memory 1206 causes processor1204 to perform the process steps described herein. In alternativeembodiments, hard-wired circuitry may be used in place of or incombination with software instructions to implement the invention. Thus,embodiments of the invention are not limited to any specific combinationof hardware circuitry and software.

The term “computer-readable medium” as used herein refers to any mediumthat participates in providing instructions to processor 1204 forexecution. Such a medium may take many forms, including but not limitedto, non-volatile media, volatile media, and transmission media.Non-volatile media includes, for example, optical or magnetic disks,such as storage device 1210. Volatile media includes dynamic memory,such as main memory 1206. Transmission media includes coaxial cables,copper wire and fiber optics, including the wires that comprise bus1202. Transmission media can also take the form of acoustic or lightwaves, such as those generated during radio-wave and infra-red datacommunications.

Common forms of computer-readable media include, for example, a floppydisk, a flexible disk, hard disk, magnetic tape, or any other magneticmedium, a CD-ROM, any other optical medium, punchcards, papertape, anyother physical medium with patterns of holes, a RAM, a PROM, and EPROM,a FLASH-EPROM, any other memory chip or cartridge, a carrier wave asdescribed hereinafter, or any other medium from which a computer canread.

Various forms of computer readable media may be involved in carrying oneor more sequences of one or more instructions to processor 1204 forexecution. For example, the instructions may initially be carried on amagnetic disk of a remote computer. The remote computer can load theinstructions into its dynamic memory and send the instructions over atelephone line using a modem. A modem local to computer system 1200 canreceive the data on the telephone line and use an infra-red transmitterto convert the data to an infra-red signal. An infra-red detector canreceive the data carried in the infra-red signal and appropriatecircuitry can place the data on bus 1202. Bus 1202 carries the data tomain memory 1206, from which processor 1204 retrieves and executes theinstructions. The instructions received by main memory 1206 mayoptionally be stored on storage device 1210 either before or afterexecution by processor 1204.

Computer system 1200 belongs to a shared disk system in which data onone or more storage devices (e.g. disk drives 1255) are accessible toboth computer system 1200 and to one or more other CPUs (e.g. CPU 1251).In the illustrated system shared access to the disk drives 1255 isprovided by a system area network 1253. However, various mechanisms mayalternatively be used to provide shared access.

Computer system 1200 also includes a communication interface 1218coupled to bus 1202. Communication interface 1218 provides a two-waydata communication coupling to a network link 1220 that is connected toa local network 1222. For example, communication interface 1218 may bean integrated services digital network (ISDN) card or a modem to providea data communication connection to a corresponding type of telephoneline. As another example, communication interface 1218 may be a localarea network (LAN) card to provide a data communication connection to acompatible LAN. Wireless links may also be implemented. In any suchimplementation, communication interface 1218 sends and receiveselectrical, electromagnetic or optical signals that carry digital datastreams representing various types of information.

Network link 1220 typically provides data communication through one ormore networks to other data devices. For example, network link 1220 mayprovide a connection through local network 1222 to a host computer 1224or to data equipment operated by an Internet Service Provider (ISP)1226. ISP 1226 in turn provides data communication services through theworld wide packet data communication network now commonly referred to asthe “Internet” 1228. Local network 1222 and Internet 1228 both useelectrical, electromagnetic or optical signals that carry digital datastreams. The signals through the various networks and the signals onnetwork link 1220 and through communication interface 1218, which carrythe digital data to and from computer system 1200, are exemplary formsof carrier waves transporting the information.

Computer system 1200 can send messages and receive data, includingprogram code, through the network(s), network link 1220 andcommunication interface 1218. In the Internet example, a server 1230might transmit a requested code for an application program throughInternet 1228, ISP 1226, local network 1222 and communication interface1218.

As the code is received, the received code may be executed by processor1204 and/or stored in storage device 1210, or other non-volatile storagefor later execution. In this manner, computer system 1200 may obtainapplication code in the form of a carrier wave.

In the foregoing specification, the invention has been described withreference to specific embodiments thereof. It will, however, be evidentthat various modifications and changes may be made thereto withoutdeparting from the broader spirit and scope of the invention. Thespecification and drawings are, accordingly, to be regarded in anillustrative rather than a restrictive sense.

1. A method for managing access to a resource, the method comprising thecomputer-implemented steps of: sending, from a requestor to a master ofthe resource, a lock mode request for a lock mode on the resource;receiving the resource at the requestor from a holder of the resource,wherein the holder of the resource is separate and distinct from themaster of the resource, and wherein the holder is a process thatcurrently holds rights to access the resource by virtue of a lock mode,on the resource, that was previously granted to the holder by the masterof the resource; and accessing the resource as if the requestor had beengranted the lock mode without waiting to receive an express lock modegrant from the master.
 2. The method of claim 1, further comprising thecomputer-implemented steps of: detecting that the step of receiving theresource at the requestor has occurred; and sending a lock assumemessage, from the requestor to the master, to inform the master that therequestor has assumed the lock mode relative to the resource.
 3. Amethod for managing access to a resource, the method comprising thecomputer-implemented steps of: receiving, at a holder, an inform lockholder message that a requestor needs the resource, where the holdercurrently holds the resource and a first lock mode on the resource;transferring the resource to the requestor in response to receiving theinform lock holder message without sending a status message to a masterof the resource wherein the status message is a down-convert message ora release lock message; and updating a lock mode record, maintained bythe holder, to indicate that the holder has down-converted from thefirst lock mode to a second lock mode for the resource.
 4. The method ofclaim 3, further comprising the computer-implemented step of: sending anupdate lock message to the master, wherein the update lock messageindicates the second lock mode for the resource.
 5. The method of claim3, further comprising the computer-implemented steps of: receiving, atthe holder, a message from a sender, wherein the message includes athird lock mode on the resource; detecting that the first lock mode andthe third lock mode do not match; and sending a lock status message tothe sender, wherein the lock status message includes the first lockmode.
 6. The method of claim 3, further comprising thecomputer-implemented steps of: receiving, at the holder, a singlebatched inform lock holder message that contains all informationnecessary to transfer the resource to a plurality of requestors; andtransferring the resource to the plurality of requestors.
 7. The methodof claim 3, further comprising the computer-implemented step of: sendinga lock access message from the holder to a master.
 8. A method formanaging access to a resource, the method comprising thecomputer-implemented steps of: receiving, at a master, a request messagewhich indicates that a requestor needs a particular resource of aplurality of resources, where the master maintains a plurality of lockmode records corresponding to the plurality of resources; sending, fromthe master to a holder, an inform lock holder message to indicate to theholder that the requestor needs the particular resource and to identifythe requestor to the holder to allow the holder to send the particularresource directly to the requestor; receiving a lock access message fromthe requestor where the lock access message indicates that the requestorhas assumed a lock mode relative to the particular resource; andperforming an update to a particular lock mode record of the pluralityof lock mode records in response to receiving the lock access message,wherein the update indicates that the requestor has assumed the lockmode on the particular resource.
 9. The method of claim 8, wherein thecomputer-implemented step of performing an update to a particular lockmode record of the plurality of lock mode records in response toreceiving the plurality of lock mode records in response to receivingthe lock access message is performed prior to receiving any statusmessage from the holder relating to the particular resource, and whereinthe status message is a down-convert message or a release lock message.10. The method of claim 8, wherein the computer-implemented step ofperforming an update to a particular lock mode record of the pluralityof lock mode records in response to receiving the plurality of lock moderecords in response to receiving the lock access message is performedwithout receiving the status message from the holder relating to theparticular resource, and wherein the status message is a down-convertmessage or a release lock message.
 11. The method of claim 8, furthercomprising the computer-implemented steps of: receiving, at the master,a plurality of request messages which indicate that a plurality ofrequestors need the particular resource; and sending from the master tothe holder the inform lock holder message, wherein the inform lockholder message contains all information from the plurality of requestmessages that is necessary for the holder to transfer the particularresource to the plurality of requestors.
 12. The method of claim 8,further comprising the computer-implemented steps of: receiving, at themaster, a message from a sender, wherein the message includes a secondlock mode on the particular resource; detecting that the lock mode andthe second lock mode do not match; and sending a lock status message tothe sender, wherein the lock status message includes the lock mode. 13.The method of claim 8, further comprising the computer-implemented stepsof: receiving, at the master, a second request message, wherein therequest message and the second request message both contain requests forthe resource in exclusive lock mode; and queuing the second requestmessage until the master receives the lock access message from therequestor.
 14. A method for managing access to a resource, the methodcomprising the computer-implemented steps of: receiving, at a master, arequest message which indicates that a requestor needs a particularresource of a plurality of resources, where the master maintains aplurality of lock mode records corresponding to the plurality ofresources; designating one holder out of a plurality of holders whereinthe plurality of holders all have respective lock modes for theparticular resource; sending a plurality of broadcast inform lock holdermessages, to the plurality of holders except for the one holder,indicating that the requestor needs the particular resource; receiving aplurality of update lock messages from the plurality of holders exceptfor the one holder, wherein the plurality of update lock messagesindicates the respective lock modes of the plurality of holders;sending, from the master to the one holder, an inform lock holdermessage to indicate to the one holder that the requestor needs theparticular resource; receiving a lock access message from the requestorwhere the lock access message indicates that the requestor has assumed alock mode relative to the particular resource; and performing an updateto a particular lock mode record of the plurality of lock mode recordsin response to receiving the lock access message without the masterreceiving a status message from the one holder, wherein the statusmessage is a down-convert message or a release lock message, and whereinthe update indicates that the requestor has assumed the lock mode on theparticular resource.
 15. A computer system, comprising: a processor; acomputer-readable medium storing instructions of the computer systemwhich, when executed by the processor, cause the processor to performthe computer-implemented steps of: sending, from a requestor to a masterof a resource, a lock mode request for the lock mode on the resource;receiving the resource at the requestor from a holder of the resource,wherein the holder of the resource is separate and distinct from themaster of the resource, and wherein the holder is a process thatcurrently holds rights to access the resource by virtue of a lock mode,on the resource, that was previously granted to the holder by the masterof the resource; and accessing the resource as if the requestor had beengranted the lock mode without waiting to receive an express lock modegrant from the master.
 16. The computer system of claim 15, wherein thecomputer-implemented steps further comprise the computer-implementedsteps of: detecting that the step of receiving the resource at therequestor has occurred; and sending a lock assume message from therequestor to the master to inform the master that the requestor hasassumed the lock mode relative to the resource.
 17. A computer system,comprising: a processor; a computer-readable medium, coupled to theprocessor, containing: a particular lock mode record of a plurality oflock mode records corresponding to a lock mode of a particular resourceof a plurality of resources, where a master maintains the plurality oflock mode records corresponding to the plurality of resources, whereinthe computer-readable medium stores instructions of the computer systemwhich, when executed by the processor, cause the processor to performthe computer-implemented steps of: receiving, at the master, a requestmessage which indicates that a requestor needs the particular resourceof the plurality of resources, where the master maintains the pluralityof lock mode records corresponding to the plurality of resources;sending, from the master to a holder, an inform lock holder message toindicate to the holder that the requestor needs the particular resourceand to identify the requestor to the holder to allow the holder to sendthe particular resource directly to the requestor; receiving a lockaccess message from the requestor where the lock access messageindicates that the requestor has assumed the lock mode relative to theparticular resource; and performing an update to the particular lockmode record of the plurality of lock mode records in response toreceiving the lock access message without receiving a status message,and wherein the update indicates that the requestor has assumed the lockmode on the particular resource.
 18. The computer system of claim 17,wherein the computer-implemented step of performing an update to aparticular lock mode record of the plurality of lock mode records inresponse to receiving the lock access message is performed prior toreceiving any status message from the holder relating to the particularresource, and wherein the status message is a down-convert message or arelease lock message.
 19. The computer system of claim 17, wherein thecomputer-implemented step of performing an update to a particular lockmode record of the plurality of lock mode records in response toreceiving the plurality of lock mode records in response to receivingthe lock access message is performed without receiving the statusmessage from the holder relating to the particular resource, and whereinthe status message is a down-convert message or a release lock message.20. The computer system of claim 17, wherein computer-implemented stepsfurther comprise the computer-implemented steps of: receiving, at themaster, a plurality of request messages which indicate that a pluralityof requestors need the particular resource; and sending, from the masterto the holder, the inform lock holder message, wherein the inform lockholder message contains all information from the plurality of requestmessages that is necessary for the holder to transfer the particularresource to the plurality of requestors.
 21. The computer system ofclaim 17, wherein the computer-implemented steps further comprise thecomputer-implemented steps of: receiving, at the master, a message froma sender, wherein the message includes a second lock mode on theparticular resource; detecting that the lock mode and the second lockmode do not match; and sending a lock status message to the sender,wherein the lock status message includes the lock mode.
 22. The computersystem of claim 17, wherein the computer-implemented steps furthercomprise the computer- implemented steps of: receiving, at the master, asecond request message wherein the request message and the secondrequest message both contain requests for the resource in exclusive lockmode; and queuing the second request message until the master receivesthe lock access message from the requestor.
 23. A computer system,comprising: a processor; a computer-readable medium, coupled to theprocessor, containing: a particular lock mode record of a plurality oflock mode records corresponding to a lock mode of a particular resourceof a plurality of resources, where a master maintains the plurality oflock mode records corresponding to the plurality of resources, whereinthe computer-readable medium stores instructions of the computer systemwhich, when executed by the processor, cause the processor to performthe computer-implemented steps of: receiving, at a master, a requestmessage which indicates that a requestor needs the particular resourceof the plurality of resources, where the master maintains the pluralityof lock mode records corresponding to the plurality of resources;designating one holder out of a plurality of holders wherein theplurality of holders all have respective lock modes for the particularresource; sending a plurality of broadcast inform lock holder messages,to the plurality of holders except for the one holder, indicating thatthe requestor needs the particular resource; receiving a plurality ofupdate lock messages from the plurality of holders except for the oneholder, wherein the plurality of update lock messages indicates therespective lock modes of the plurality of holders; sending, from themaster to the one holder, an inform lock holder message to indicate tothe one holder that the requestor needs the particular resource;receiving a lock access message from the requestor where the lock accessmessage indicates that the requestor has assumed the lock mode relativeto the particular resource; and performing an update to the particularlock mode record of the plurality of lock mode records in response toreceiving the lock access message without the master receiving a statusmessage from the one holder, wherein the status message is adown-convert message or a release lock message, and wherein the updateindicates that the requestor has assumed the lock mode on the particularresource.
 24. A computer system, comprising: a processor; acomputer-readable medium, coupled to the processor, containing: aresource and a first lock mode on the resource; and a lock mode recordassociated with the resource, wherein the computer-readable mediumstores instructions of the computer system which, when executed by theprocessor, cause the processor to perform the computer-implemented stepsof: receiving, at a holder, an inform lock holder message that arequestor needs the resource, wherein the holder currently holds theresource and the first lock mode on the resource; transferring theresource to the requestor in response to receiving the inform lockholder message without sending a status message to a master of theresource wherein the status message is a down-convert message or arelease lock message; and updating the lock mode record, maintained bythe holder, to indicate that the holder has down-converted from thefirst lock mode to a second lock mode for the resource.
 25. The computersystem of claim 24, wherein the computer-implemented steps furthercomprise the computer-implemented step of: sending an update lockmessage to the master, wherein the update lock message indicates thesecond lock mode for the resource.
 26. The computer system of claim 24,wherein the computer-implemented steps further comprise thecomputer-implemented steps of: receiving, at the holder, a message froma sender, wherein the message includes a third lock mode on theresource; detecting that the first lock mode and the third lock mode donot match; and sending a lock status message to the sender, wherein thelock status message includes the first lock mode.
 27. The computersystem of claim 24 wherein the computer-implemented steps furthercomprise the computer-implemented steps of: receiving, at the holder, asingle batched inform lock holder message that contains all informationnecessary to transfer the resource to a plurality of requestors; andtransferring the resource to the plurality of requestors.
 28. Acomputer-readable medium carrying one or more sequences of instructionsfor managing access to a resource, wherein execution of the one or moresequences of instructions by one or more processors causes the one ormore processors to perform the steps of: sending, from a requestor to amaster of the resource, a lock mode request for a lock mode on theresource; receiving the resource at the requestor from a holder of theresource, wherein the holder of the resource is separate and distinctfrom the master of the resource, and wherein the holder is a processthat currently holds rights to access the resource by virtue of a lockmode, on the resource, that was previously granted to the holder by themaster of the resource; and accessing the resource as if the requestorhad been granted the lock mode request without waiting to receive anexpress lock mode grant from the master.
 29. The computer-readablemedium of claim 28, wherein execution of the one or more sequences ofinstructions by the one or more processors causes the one or moreprocessors to further perform the steps of: detecting that the step ofreceiving the resource at the requestor has occurred; and sending a lockassume message from the requestor to the master to inform the masterthat the requestor has assumed the lock mode relative to the resource.30. A computer-readable medium carrying one or more sequences ofinstructions for managing access to a resource, wherein execution of theone or more sequences of instructions by one or more processors causesthe one or more processors to perform the steps of: receiving, at aholder, an inform lock holder message that a requestor needs theresource, where the holder currently holds the resource and a first lockmode on the resource; transferring the resource to the requestor inresponse to receiving the inform lock holder message without sending astatus message to a master of the resource wherein the status message isa down-convert message or a release lock message; and updating a lockmode record, maintained by the holder, to indicate that the holder hasdown-converted from the first lock mode to a second lock mode for theresource.
 31. The computer-readable medium of claim 30, whereinexecution of the one or more sequences of instructions by the one ormore processors causes the one or more processors to further perform thestep of: sending an update lock message to the master, wherein theupdate lock message indicates the second lock mode for the resource. 32.The computer-readable medium of claim 30, wherein execution of the oneor more sequences of instructions by the one or more processors causesthe one or more processors to further perform the steps of: receiving,at the holder, a message from a sender, wherein the message includes athird lock mode on the resource; detecting that the first lock mode andthe third lock mode do not match; and sending a lock status message tothe sender, wherein the lock status message includes the first lockmode.
 33. The computer-readable medium of claim 30, wherein execution ofthe one or more sequences of instructions by the one or more processorscauses the one or more processors to further perform the steps of:receiving, at the holder, a single batched inform lock holder messagethat contains all information necessary to transfer the resource to aplurality of requestors; and transferring the resource to the pluralityof requestors.
 34. The method for claim 30, wherein execution of the oneor more sequences of instructions by the one or more processors causesthe one or more processors to further perform the step of: sending alock access message from the holder to a master.
 35. A computer-readablemedium carrying one or more sequences of instructions for managingaccess to a resource, wherein execution of the one or more sequences ofinstructions by one or more processors causes the one or more processorsto perform the steps of: receiving, at a master, a request message whichindicates that a requestor needs a particular resource of a plurality ofresources, wherein the master maintains a plurality of lock mode recordscorresponding to the plurality of resources; sending, from the master toa holder, an inform lock holder message to indicate to the holder thatthe requestor needs the particular resource and to identify therequestor to the holder to allow the holder to send the particularresource directly to the requestor; receiving a lock access message fromthe requestor where the lock access message indicates that the requestorhas assumed a lock mode relative to the particular resource; andperforming an update to a particular lock mode record of the pluralityof lock mode records in response to receiving the lock access message,wherein the update indicates that the requestor has assumed the lockmode on the particular resource.
 36. The computer-readable medium ofclaim 35, wherein the step of performing an update to a particular lockmode record of the plurality of lock mode records in response toreceiving the lock access message is performed prior to receiving anystatus message from the holder relating to the particular resource, andwherein the status message is a down-convert message or a release lockmessage.
 37. The computer-readable medium of claim 35, wherein the stepof performing an update to a particular lock mode record of theplurality of lock mode records in response to receiving the plurality oflock mode records in response to receiving the lock access message isperformed without receiving the status message from the holder relatingto the particular resource, and wherein the status message is adown-convert message or a release lock message.
 38. Thecomputer-readable medium of claim 35, wherein execution of the one ormore sequences of instructions by the one or more processors causes theone or more processors to further perform the steps of: receiving, atthe master, a plurality of request messages which indicate that aplurality of requestors need the particular resource; and sending, fromthe master to the holder, the inform lock holder message, wherein theinform lock holder message contains all information from the pluralityof request messages that is necessary for the holder to transfer theparticular resource to the plurality of requestors.
 39. Thecomputer-readable medium of claim 35, wherein execution of the one ormore sequences of instructions by the one or more processors causes theone or more processors to further perform the steps of: receiving, atthe master, a message from a sender, wherein the message includes asecond lock mode on the particular resource; detecting that the lockmode and the second lock mode do not match; and sending a lock statusmessage to the sender, wherein the lock status message includes the lockmode.
 40. The computer-readable medium of claim 35, wherein execution ofthe one or more sequences of instructions by the one or more processorscauses the one or more processors to further perform the steps of:receiving, at the master, a second request message, wherein the requestmessage and the second request message both contain requests for theresource in exclusive lock mode; and queuing the second request messageuntil the master receives the lock access message from the requestor.41. A computer-readable medium carrying one or more sequences ofinstructions for managing access to a resource, wherein execution of theone or more sequences of instructions by one or more processors causesthe one or more processors to perform the steps of: receiving, at amaster, a request message which indicates that a requestor needs aparticular resource of a plurality of resources, where the mastermaintains a plurality of lock mode records corresponding to theplurality of resources; designating one holder out of a plurality ofholders wherein the plurality of holders all have respective lock modesfor the particular resource; sending a plurality of broadcast informlock holder messages, to the plurality of holders except for the oneholder, indicating that the requestor needs the particular resource;receiving a plurality of update lock messages from the plurality ofholders except for the one holder, wherein the plurality of update lockmessages indicates the respective lock modes of the plurality ofholders; sending, from the master to the one holder, an inform lockholder message to indicate to the one holder that the requestor needsthe particular resource; receiving a lock access message from therequestor where the lock access message indicates that the requestor hasassumed a lock mode relative to the particular resource; and performingan update to a particular lock mode record of the plurality of lock moderecords in response to receiving the lock access message without themaster receiving a status message from the one holder, wherein thestatus message is a down-convert message or a release lock message, andwherein the update indicates that the requestor has assumed the lockmode on the particular resource.